namespace LS.Digitize
{
    public struct WriteDictionaryScope: IScope
    {
        public IWriter Writer { get; private set; }
        
        public WriteDictionaryScope(IWriter writer)
        {
            Writer = writer;
            writer.StartWriteDictionary();
        }
        
        public void Dispose()
        {
            Writer.EndWriteDictionary();
            Writer = null;
        }
    }
}